//
//  CinemaTableViewCell.m
//  豆瓣
//
//  Created by dllo on 15/11/23.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "CinemaTableViewCell.h"

@implementation CinemaTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        [self createCell];
    }
    
    return self;
}

- (void)createCell {
    
    
   /********************************** 自定义cell *************************************/
    
    
    // 蓝灰的背景图片
    UIImageView *backgroundImageV = [[UIImageView alloc] initWithFrame:CGRectMake(15, 10, [UIScreen mainScreen].bounds.size.width - 30, 165)];
    backgroundImageV.image = [UIImage imageNamed:@"bg_eventlistcell.png"];
    [self addSubview:backgroundImageV];
    [backgroundImageV release];
    
    // 影院名Label
    self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(8, 10, backgroundImageV.frame.size.width - 10,30)];
    self.nameLabel.font = [UIFont systemFontOfSize:19];
    [backgroundImageV addSubview:self.nameLabel];
    [self.nameLabel release];
    
    // 影院地址Label
    self.addressLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.nameLabel.frame.origin.x, 25, backgroundImageV.frame.size.width - 2 * self.nameLabel.frame.origin.x, 100)];
    self.addressLabel.font = [UIFont systemFontOfSize:15];
    self.addressLabel.lineBreakMode = NSLineBreakByWordWrapping;
    self.addressLabel.numberOfLines = 0;
    [backgroundImageV addSubview:self.addressLabel];
    [self.addressLabel release];
    
    // 影院电话Label
    self.phoneLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.nameLabel.frame.origin.x, 115, 200, 20)];
    self.phoneLabel.font = [UIFont systemFontOfSize:15];
    [backgroundImageV addSubview:self.phoneLabel];
    [self.phoneLabel release];
    
}

- (void)awakeFromNib {
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    
}

@end
